#if _DEBUG

#include <cppunit/config/SourcePrefix.h>
#include "SiblingTest.h"
#include <iostream>

void SiblingTest::setUp()
{
}

void SiblingTest::tearDown()
{
}

CPPUNIT_TEST_SUITE_REGISTRATION( SiblingTest );

void SiblingTest::testSibling()
{
	STMT s1; s1.node_type=ASSIGN; s1.statement_number = 1;
	STMT s2; s2.node_type=ASSIGN; s2.statement_number = 2;
	STMT s3; s3.node_type=ASSIGN; s3.statement_number = 3;
	STMT s4; s4.node_type=ASSIGN; s4.statement_number = 4;
	STMT s5; s5.node_type=ASSIGN; s5.statement_number = 5;
	STMT s6; s6.node_type=ASSIGN; s6.statement_number = 6;
	STMT s7; s7.node_type=ASSIGN; s7.statement_number = 7;
	STMT s8; s8.node_type=ASSIGN; s8.statement_number = 8;

	PKB::follows.InsertFollows(s1,s2);
	PKB::follows.InsertFollows(s2,s3);
	PKB::follows.InsertFollows(s3,s4);
	PKB::follows.InsertFollows(s4,s5);
	PKB::follows.InsertFollows(s5,s6);
	PKB::follows.InsertFollows(s6,s7);
	PKB::follows.InsertFollows(s7,s8);

	vector<int> v1; v1.push_back(4); v1.push_back(5); v1.push_back(6); v1.push_back(16);
	vector<int> v2; v2.push_back(2); v2.push_back(3); v2.push_back(4); v2.push_back(40);
	//vector<int> v1; for (i=1;i<=100;i++) v1.push_back(i);
	//vector<int> v2; v2.push_back(4);

	vector<vector<int>> result = _siblinghandle->RetrieveSibling(v1,v2);
	//vector<vector<int>> result = _siblinghandle->RetrieveSibling(v2,v1);
	CPPUNIT_ASSERT(result.size() == 2);
	
	vector<int> left = result[0];
	vector<int> right = result[1];
	CPPUNIT_ASSERT(left.size() == right.size());
	
	//cout << endl;
	//cout << left.size() << " - " << right.size() << endl;
	unsigned int i; 
	for (i = 0; i < left.size() ; i++)
	{
		//cout << left[i] << ", " << right[i] << endl;
	}
}

#endif